<div class="content-wrapper">

    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>
        <h1 class="pull-right">
            <?php echo $this->HelpUrl('goodsSpecTag'); ?>
        </h1>
    </section>

    <section class="content">
        <?php echo $this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-xs-12">
                    <div class="box shop-box">
                        <div class="box-body table-responsive no-padding">
                            <table class="table shop-table table-hover">
                                <thead>
                                <tr class="shop-bg-thead">
                                    <th width="40%"><?php echo $this->translate('标签名称'); ?></th>
                                    <th width="15%"><?php echo $this->translate('模板类型'); ?></th>
                                    <th width="20%"><?php echo $this->translate('标签标记'); ?></th>
                                    <th width="15%"><?php echo $this->translate('商品数量'); ?></th>
                                    <th width="10%"><?php echo $this->translate('操作'); ?></th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php if($this->mobileSpecTag) foreach ($this->mobileSpecTag as $key => $value) { ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($value); ?></td>
                                        <td><?php echo $this->translate('手机'); ?></td>
                                        <td><?php echo $this->escapeHtml($key); ?></td>
                                        <td><?php echo isset($this->specTagGoodsNum['mobile'][$key]) ? $this->specTagGoodsNum['mobile'][$key] : 0; ?></td>
                                        <td>
                                            <a href="<?php echo $this->url('goods-spec-tag',
                                                ['action'=>'editSpecTagGoods'], ['query' =>['specTag' => $key, 'type' => 'mobile']]); ?>"
                                               class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('设置商品'); ?></a>
                                        </td>
                                    </tr>
                                <?php } ?>

                                <?php if($this->pcSpecTag) foreach ($this->pcSpecTag as $key => $value) { ?>
                                    <tr>
                                        <td><?php echo $this->escapeHtml($value); ?></td>
                                        <td><?php echo $this->translate('电脑'); ?></td>
                                        <td><?php echo $this->escapeHtml($key); ?></td>
                                        <td><?php echo isset($this->specTagGoodsNum['pc'][$key]) ? $this->specTagGoodsNum['pc'][$key] : 0; ?></td>
                                        <td>
                                            <a href="<?php echo $this->url('goods-spec-tag',
                                                ['action'=>'editSpecTagGoods'], ['query' =>['specTag' => $key, 'type' => 'pc']]); ?>"
                                               class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('设置商品'); ?></a>
                                        </td>
                                    </tr>
                                <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
            </div>
        </div>

    </section>

</div>